package com.ytjj.qmyx.users.dao;

import com.ytjj.common.enums.ScoreSourceEnum;
import com.ytjj.qmyx.users.model.entity.UserScore;
import com.ytjj.qmyx.users.model.response.ScoreTaskResponse;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 *  *
 **/
public interface UserScoreDao {

    Boolean existPersonalData(@Param("userId") Integer userId);

    Boolean existSignIn(Integer userId);

    int countByMonth(@Param("userId") Integer userId, @Param("sourceEnum") ScoreSourceEnum sourceEnum);

    int countByToday(@Param("userId") Integer userId, @Param("sourceEnum") ScoreSourceEnum sourceEnum);

    int countByYear(@Param("userId") Integer userId, @Param("sourceEnum") ScoreSourceEnum sourceEnum);

    UserScore findUserScore(Integer userId);

    void updateUserScore(UserScore userScore);

    void insertUserScoreRecord(UserScore userScore);

    List<ScoreTaskResponse> findUserScoreTask(Integer id);

    boolean existByUserIdAndSource(@Param("userId") Integer userId, @Param("source") ScoreSourceEnum source, @Param("uniqueId") Integer uniqueId);
}
